x86/mm: fix a reference counting error in MMU_MACHPHYS_UPDATE
authorAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 20 Nov 2014 16:38:46 +0000 (17:38 +0100)
committerJan Beulich <jbeulich@suse.com>
Thu, 20 Nov 2014 16:38:46 +0000 (17:38 +0100)
commit6913fa31fa898f45ecc3b00e2397b8ebc75c8df4
tree6c297d9058bd041d36620531741ea0ec8db32b67
parent4413affc5fd5d36286d82f815eb9d3084ae5c21a
x86/mm: fix a reference counting error in MMU_MACHPHYS_UPDATE

Any domain which can pass the XSM check against a translated guest can cause a
page reference to be leaked.

While shuffling the order of checks, drop the quite-pointless MEM_LOG().  This
brings the check in line with similar checks in the vicinity.

Discovered while reviewing the XSA-109/110 followup series.

This is XSA-113.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Tim Deegan <tim@xen.org>
xen/arch/x86/mm.c